Integrand size = 21, antiderivative size = 161 \[ \int \frac {\sin ^4(c+d x)}{a+b \sec (c+d x)} \, dx=\frac {\left (3 a^4-12 a^2 b^2+8 b^4\right ) x}{8 a^5}-\frac {2 (a-b)^{3/2} b (a+b)^{3/2} \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^5 d}+\frac {\left (8 b \left (a^2-b^2\right )-a \left (3 a^2-4 b^2\right ) \cos (c+d x)\right ) \sin (c+d x)}{8 a^4 d}+\frac {(4 b-3 a \cos (c+d x)) \sin ^3(c+d x)}{12 a^2 d} \]
[Out]
Time = 0.47 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3957, 2944, 2814, 2738, 214} \[ \int \frac {\sin ^4(c+d x)}{a+b \sec (c+d x)} \, dx=-\frac {2 b (a-b)^{3/2} (a+b)^{3/2} \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^5 d}+\frac {\sin ^3(c+d x) (4 b-3 a \cos (c+d x))}{12 a^2 d}+\frac {\sin (c+d x) \left (8 b \left (a^2-b^2\right )-a \left (3 a^2-4 b^2\right ) \cos (c+d x)\right )}{8 a^4 d}+\frac {x \left (3 a^4-12 a^2 b^2+8 b^4\right )}{8 a^5} \]
[In]
[Out]
Rule 214
Rule 2738
Rule 2814
Rule 2944
Rule 3957
Rubi steps \begin{align*} \text {integral}& = -\int \frac {\cos (c+d x) \sin ^4(c+d x)}{-b-a \cos (c+d x)} \, dx \\ & = \frac {(4 b-3 a \cos (c+d x)) \sin ^3(c+d x)}{12 a^2 d}-\frac {\int \frac {\left (-a b+\left (3 a^2-4 b^2\right ) \cos (c+d x)\right ) \sin ^2(c+d x)}{-b-a \cos (c+d x)} \, dx}{4 a^2} \\ & = \frac {\left (8 b \left (a^2-b^2\right )-a \left (3 a^2-4 b^2\right ) \cos (c+d x)\right ) \sin (c+d x)}{8 a^4 d}+\frac {(4 b-3 a \cos (c+d x)) \sin ^3(c+d x)}{12 a^2 d}-\frac {\int \frac {-a b \left (5 a^2-4 b^2\right )+\left (3 a^4-12 a^2 b^2+8 b^4\right ) \cos (c+d x)}{-b-a \cos (c+d x)} \, dx}{8 a^4} \\ & = \frac {\left (3 a^4-12 a^2 b^2+8 b^4\right ) x}{8 a^5}+\frac {\left (8 b \left (a^2-b^2\right )-a \left (3 a^2-4 b^2\right ) \cos (c+d x)\right ) \sin (c+d x)}{8 a^4 d}+\frac {(4 b-3 a \cos (c+d x)) \sin ^3(c+d x)}{12 a^2 d}+\frac {\left (b \left (a^2-b^2\right )^2\right ) \int \frac {1}{-b-a \cos (c+d x)} \, dx}{a^5} \\ & = \frac {\left (3 a^4-12 a^2 b^2+8 b^4\right ) x}{8 a^5}+\frac {\left (8 b \left (a^2-b^2\right )-a \left (3 a^2-4 b^2\right ) \cos (c+d x)\right ) \sin (c+d x)}{8 a^4 d}+\frac {(4 b-3 a \cos (c+d x)) \sin ^3(c+d x)}{12 a^2 d}+\frac {\left (2 b \left (a^2-b^2\right )^2\right ) \text {Subst}\left (\int \frac {1}{-a-b+(a-b) x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{a^5 d} \\ & = \frac {\left (3 a^4-12 a^2 b^2+8 b^4\right ) x}{8 a^5}-\frac {2 (a-b)^{3/2} b (a+b)^{3/2} \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^5 d}+\frac {\left (8 b \left (a^2-b^2\right )-a \left (3 a^2-4 b^2\right ) \cos (c+d x)\right ) \sin (c+d x)}{8 a^4 d}+\frac {(4 b-3 a \cos (c+d x)) \sin ^3(c+d x)}{12 a^2 d} \\ \end{align*}
Time = 0.75 (sec) , antiderivative size = 172, normalized size of antiderivative = 1.07 \[ \int \frac {\sin ^4(c+d x)}{a+b \sec (c+d x)} \, dx=\frac {36 a^4 c-144 a^2 b^2 c+96 b^4 c+36 a^4 d x-144 a^2 b^2 d x+96 b^4 d x+192 b \left (a^2-b^2\right )^{3/2} \text {arctanh}\left (\frac {(-a+b) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )+24 a b \left (5 a^2-4 b^2\right ) \sin (c+d x)-24 \left (a^4-a^2 b^2\right ) \sin (2 (c+d x))-8 a^3 b \sin (3 (c+d x))+3 a^4 \sin (4 (c+d x))}{96 a^5 d} \]
[In]
[Out]
Time = 0.97 (sec) , antiderivative size = 264, normalized size of antiderivative = 1.64
method | result | size |
derivativedivides | \(\frac {-\frac {2 \left (a -b \right )^{2} \left (a +b \right )^{2} b \,\operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{a^{5} \sqrt {\left (a -b \right ) \left (a +b \right )}}+\frac {\frac {2 \left (\left (\frac {3}{8} a^{4}+a^{3} b -\frac {1}{2} a^{2} b^{2}-a \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}+\left (\frac {13}{3} a^{3} b -\frac {1}{2} a^{2} b^{2}-3 a \,b^{3}+\frac {11}{8} a^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}+\left (-\frac {11}{8} a^{4}+\frac {1}{2} a^{2} b^{2}+\frac {13}{3} a^{3} b -3 a \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+\left (a^{3} b -a \,b^{3}-\frac {3}{8} a^{4}+\frac {1}{2} a^{2} b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{4}}+\frac {\left (3 a^{4}-12 a^{2} b^{2}+8 b^{4}\right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}}{a^{5}}}{d}\) | \(264\) |
default | \(\frac {-\frac {2 \left (a -b \right )^{2} \left (a +b \right )^{2} b \,\operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{a^{5} \sqrt {\left (a -b \right ) \left (a +b \right )}}+\frac {\frac {2 \left (\left (\frac {3}{8} a^{4}+a^{3} b -\frac {1}{2} a^{2} b^{2}-a \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}+\left (\frac {13}{3} a^{3} b -\frac {1}{2} a^{2} b^{2}-3 a \,b^{3}+\frac {11}{8} a^{4}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}+\left (-\frac {11}{8} a^{4}+\frac {1}{2} a^{2} b^{2}+\frac {13}{3} a^{3} b -3 a \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+\left (a^{3} b -a \,b^{3}-\frac {3}{8} a^{4}+\frac {1}{2} a^{2} b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{4}}+\frac {\left (3 a^{4}-12 a^{2} b^{2}+8 b^{4}\right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}}{a^{5}}}{d}\) | \(264\) |
risch | \(\frac {3 x}{8 a}-\frac {3 x \,b^{2}}{2 a^{3}}+\frac {x \,b^{4}}{a^{5}}-\frac {5 i b \,{\mathrm e}^{i \left (d x +c \right )}}{8 d \,a^{2}}+\frac {i b^{3} {\mathrm e}^{i \left (d x +c \right )}}{2 d \,a^{4}}+\frac {5 i b \,{\mathrm e}^{-i \left (d x +c \right )}}{8 d \,a^{2}}-\frac {i b^{3} {\mathrm e}^{-i \left (d x +c \right )}}{2 d \,a^{4}}+\frac {\sqrt {a^{2}-b^{2}}\, b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {-i a^{2}+i b^{2}+b \sqrt {a^{2}-b^{2}}}{a \sqrt {a^{2}-b^{2}}}\right )}{d \,a^{3}}-\frac {\sqrt {a^{2}-b^{2}}\, b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {-i a^{2}+i b^{2}+b \sqrt {a^{2}-b^{2}}}{a \sqrt {a^{2}-b^{2}}}\right )}{d \,a^{5}}-\frac {\sqrt {a^{2}-b^{2}}\, b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+b \sqrt {a^{2}-b^{2}}}{\sqrt {a^{2}-b^{2}}\, a}\right )}{d \,a^{3}}+\frac {\sqrt {a^{2}-b^{2}}\, b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+b \sqrt {a^{2}-b^{2}}}{\sqrt {a^{2}-b^{2}}\, a}\right )}{d \,a^{5}}+\frac {\sin \left (4 d x +4 c \right )}{32 a d}-\frac {b \sin \left (3 d x +3 c \right )}{12 a^{2} d}-\frac {\sin \left (2 d x +2 c \right )}{4 d a}+\frac {\sin \left (2 d x +2 c \right ) b^{2}}{4 d \,a^{3}}\) | \(467\) |
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 393, normalized size of antiderivative = 2.44 \[ \int \frac {\sin ^4(c+d x)}{a+b \sec (c+d x)} \, dx=\left [\frac {3 \, {\left (3 \, a^{4} - 12 \, a^{2} b^{2} + 8 \, b^{4}\right )} d x - 12 \, {\left (a^{2} b - b^{3}\right )} \sqrt {a^{2} - b^{2}} \log \left (\frac {2 \, a b \cos \left (d x + c\right ) - {\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d x + c\right )^{2} + 2 \, \sqrt {a^{2} - b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right ) + 2 \, a^{2} - b^{2}}{a^{2} \cos \left (d x + c\right )^{2} + 2 \, a b \cos \left (d x + c\right ) + b^{2}}\right ) + {\left (6 \, a^{4} \cos \left (d x + c\right )^{3} - 8 \, a^{3} b \cos \left (d x + c\right )^{2} + 32 \, a^{3} b - 24 \, a b^{3} - 3 \, {\left (5 \, a^{4} - 4 \, a^{2} b^{2}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{24 \, a^{5} d}, \frac {3 \, {\left (3 \, a^{4} - 12 \, a^{2} b^{2} + 8 \, b^{4}\right )} d x - 24 \, {\left (a^{2} b - b^{3}\right )} \sqrt {-a^{2} + b^{2}} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )}}{{\left (a^{2} - b^{2}\right )} \sin \left (d x + c\right )}\right ) + {\left (6 \, a^{4} \cos \left (d x + c\right )^{3} - 8 \, a^{3} b \cos \left (d x + c\right )^{2} + 32 \, a^{3} b - 24 \, a b^{3} - 3 \, {\left (5 \, a^{4} - 4 \, a^{2} b^{2}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{24 \, a^{5} d}\right ] \]
[In]
[Out]
\[ \int \frac {\sin ^4(c+d x)}{a+b \sec (c+d x)} \, dx=\int \frac {\sin ^{4}{\left (c + d x \right )}}{a + b \sec {\left (c + d x \right )}}\, dx \]
[In]
[Out]
Exception generated. \[ \int \frac {\sin ^4(c+d x)}{a+b \sec (c+d x)} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 407 vs. \(2 (145) = 290\).
Time = 0.31 (sec) , antiderivative size = 407, normalized size of antiderivative = 2.53 \[ \int \frac {\sin ^4(c+d x)}{a+b \sec (c+d x)} \, dx=\frac {\frac {3 \, {\left (3 \, a^{4} - 12 \, a^{2} b^{2} + 8 \, b^{4}\right )} {\left (d x + c\right )}}{a^{5}} - \frac {48 \, {\left (a^{4} b - 2 \, a^{2} b^{3} + b^{5}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, a + 2 \, b\right ) + \arctan \left (-\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {-a^{2} + b^{2}}}\right )\right )}}{\sqrt {-a^{2} + b^{2}} a^{5}} + \frac {2 \, {\left (9 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 24 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 12 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 24 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 33 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 104 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 12 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 72 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 33 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 104 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 12 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 72 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 9 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 24 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 12 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 24 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4} a^{4}}}{24 \, d} \]
[In]
[Out]
Time = 14.78 (sec) , antiderivative size = 317, normalized size of antiderivative = 1.97 \[ \int \frac {\sin ^4(c+d x)}{a+b \sec (c+d x)} \, dx=\frac {\frac {5\,b\,\sin \left (c+d\,x\right )}{4}-\frac {b\,\sin \left (3\,c+3\,d\,x\right )}{12}}{a^2\,d}-\frac {3\,b^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )-\frac {b^2\,\sin \left (2\,c+2\,d\,x\right )}{4}}{a^3\,d}+\frac {\frac {3\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{4}-\frac {\sin \left (2\,c+2\,d\,x\right )}{4}+\frac {\sin \left (4\,c+4\,d\,x\right )}{32}}{a\,d}-\frac {b^3\,\sin \left (c+d\,x\right )}{a^4\,d}+\frac {2\,b^4\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{a^5\,d}-\frac {2\,b\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {a^6-3\,a^4\,b^2+3\,a^2\,b^4-b^6}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^3+\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^2\,b-\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a\,b^2-\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,b^3}\right )\,\sqrt {a^6-3\,a^4\,b^2+3\,a^2\,b^4-b^6}}{a^5\,d} \]
[In]
[Out]